package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_group_device_day_divide_cnt的数据传输对象基类,直接与表对应<br>
 */
public abstract class GroupDeviceDayDivideCntModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id = 0;
    /**
     * 属性:terminal<br>
     */
    private String terminal = "";
    /**
     * 属性:name<br>
     */
    private String name = "";
    /**
     * 属性:address<br>
     */
    private String address = "";
    /**
     * 属性:borrowUserSum<br>
     */
    private Integer borrowUserSum = 0;
    /**
     * 属性:borrowCDBSum<br>
     */
    private Integer borrowCDBSum = 0;
    /**
     * 属性:newUserSum<br>
     */
    private Integer newUserSum = 0;
    /**
     * 属性:borrowRentSum<br>
     */
    private Double borrowRentSum = 0.0;
    /**
     * 属性:sellLineMoneySum<br>
     */
    private Double sellLineMoneySum = 0.0;
    /**
     * 属性:addTime<br>
     */
    private Date addTime = new Date();
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime = new Date();
    /**
     * 属性:sortTime<br>
     */
    private Long sortTime = null;
    /**
     * 属性:sellCDBSum<br>
     */
    private Double sellCDBSum = 0.0;
    /**
     * 属性:sellCDBNum<br>
     */
    private Integer sellCDBNum = 0;
    /**
     * 属性:sellLineNum<br>
     */
    private Integer sellLineNum = 0;
    /**
     * 属性:presentLineNum<br>
     */
    private Integer presentLineNum = 0;
    /**
     * 属性:groupUserId<br>
     */
    private Integer groupUserId = 0;
    /**
     * 属性:higherUpGroupUserId<br>
     */
    private Integer higherUpGroupUserId = 0;
    /**
     * 属性:residueBorrowRentSum<br>
     */
    private Double residueBorrowRentSum = 0.0;
    /**
     * 属性:residueSellLineMoneySum<br>
     */
    private Double residueSellLineMoneySum = 0.0;
    /**
     * 属性:residueSellCDBSum<br>
     */
    private Double residueSellCDBSum = 0.0;
    /**
     * 属性:level<br>
     */
    private Integer level = 0;
    
    private Integer buyCDBGiveBackCnt = 0;
    
    private Double buyCDBGiveBackMoney = 0.0;
    
    private Double residueBuyCDBGiveBackMoney = 0.0;

    /**
     *  默认构造方法,构造一个默认的GroupDeviceDayDivideCntModelBase对象
     */
    public GroupDeviceDayDivideCntModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public GroupDeviceDayDivideCntModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.terminal = rs.getString("terminal");
               this.name = rs.getString("name");
               this.address = rs.getString("address");
               this.borrowUserSum = rs.getInt("borrowUserSum");
               this.borrowCDBSum = rs.getInt("borrowCDBSum");
               this.newUserSum = rs.getInt("newUserSum");
               this.borrowRentSum = rs.getDouble("borrowRentSum");
               this.sellLineMoneySum = rs.getDouble("sellLineMoneySum");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.sortTime = rs.getLong("sortTime");
               this.sellCDBSum = rs.getDouble("sellCDBSum");
               this.sellCDBNum = rs.getInt("sellCDBNum");
               this.sellLineNum = rs.getInt("sellLineNum");
               this.presentLineNum = rs.getInt("presentLineNum");
               this.groupUserId = rs.getInt("groupUserId");
               this.higherUpGroupUserId = rs.getInt("higherUpGroupUserId");
               this.residueBorrowRentSum = rs.getDouble("residueBorrowRentSum");
               this.residueSellLineMoneySum = rs.getDouble("residueSellLineMoneySum");
               this.residueSellCDBSum = rs.getDouble("residueSellCDBSum");
               this.level = rs.getInt("level");
               this.buyCDBGiveBackCnt = rs.getInt("buyCDBGiveBackCnt");
               this.buyCDBGiveBackMoney = rs.getDouble("buyCDBGiveBackMoney");
               this.residueBuyCDBGiveBackMoney = rs.getDouble("residueBuyCDBGiveBackMoney");               
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }


    public Integer getBuyCDBGiveBackCnt() {
		return buyCDBGiveBackCnt;
	}

	public void setBuyCDBGiveBackCnt(Integer buyCDBGiveBackCnt) {
		this.buyCDBGiveBackCnt = buyCDBGiveBackCnt;
	}

	public Double getBuyCDBGiveBackMoney() {
		return buyCDBGiveBackMoney;
	}

	public void setBuyCDBGiveBackMoney(Double buyCDBGiveBackMoney) {
		this.buyCDBGiveBackMoney = buyCDBGiveBackMoney;
	}

	public Double getResidueBuyCDBGiveBackMoney() {
		return residueBuyCDBGiveBackMoney;
	}

	public void setResidueBuyCDBGiveBackMoney(Double residueBuyCDBGiveBackMoney) {
		this.residueBuyCDBGiveBackMoney = residueBuyCDBGiveBackMoney;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性terminal<br>
     * @param terminal 待设置的属性terminal的值
     */
    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    /**
     * 获取属性terminal<br>
     * @return 属性terminal的值
     */
    public String getTerminal() {
        return terminal;
    }

    /**
     * 设置属性name<br>
     * @param name 待设置的属性name的值
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取属性name<br>
     * @return 属性name的值
     */
    public String getName() {
        return name;
    }

    /**
     * 设置属性address<br>
     * @param address 待设置的属性address的值
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取属性address<br>
     * @return 属性address的值
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置属性borrowUserSum<br>
     * @param borrowUserSum 待设置的属性borrowUserSum的值
     */
    public void setBorrowUserSum(Integer borrowUserSum) {
        this.borrowUserSum = borrowUserSum;
    }

    /**
     * 获取属性borrowUserSum<br>
     * @return 属性borrowUserSum的值
     */
    public Integer getBorrowUserSum() {
        return borrowUserSum;
    }

    /**
     * 设置属性borrowCDBSum<br>
     * @param borrowCDBSum 待设置的属性borrowCDBSum的值
     */
    public void setBorrowCDBSum(Integer borrowCDBSum) {
        this.borrowCDBSum = borrowCDBSum;
    }

    /**
     * 获取属性borrowCDBSum<br>
     * @return 属性borrowCDBSum的值
     */
    public Integer getBorrowCDBSum() {
        return borrowCDBSum;
    }

    /**
     * 设置属性newUserSum<br>
     * @param newUserSum 待设置的属性newUserSum的值
     */
    public void setNewUserSum(Integer newUserSum) {
        this.newUserSum = newUserSum;
    }

    /**
     * 获取属性newUserSum<br>
     * @return 属性newUserSum的值
     */
    public Integer getNewUserSum() {
        return newUserSum;
    }

    /**
     * 设置属性borrowRentSum<br>
     * @param borrowRentSum 待设置的属性borrowRentSum的值
     */
    public void setBorrowRentSum(Double borrowRentSum) {
        this.borrowRentSum = borrowRentSum;
    }

    /**
     * 获取属性borrowRentSum<br>
     * @return 属性borrowRentSum的值
     */
    public Double getBorrowRentSum() {
        return borrowRentSum;
    }

    /**
     * 设置属性sellLineMoneySum<br>
     * @param sellLineMoneySum 待设置的属性sellLineMoneySum的值
     */
    public void setSellLineMoneySum(Double sellLineMoneySum) {
        this.sellLineMoneySum = sellLineMoneySum;
    }

    /**
     * 获取属性sellLineMoneySum<br>
     * @return 属性sellLineMoneySum的值
     */
    public Double getSellLineMoneySum() {
        return sellLineMoneySum;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性sortTime<br>
     * @param sortTime 待设置的属性sortTime的值
     */
    public void setSortTime(Long sortTime) {
        this.sortTime = sortTime;
    }

    /**
     * 获取属性sortTime<br>
     * @return 属性sortTime的值
     */
    public Long getSortTime() {
        return sortTime;
    }

    /**
     * 设置属性sellCDBSum<br>
     * @param sellCDBSum 待设置的属性sellCDBSum的值
     */
    public void setSellCDBSum(Double sellCDBSum) {
        this.sellCDBSum = sellCDBSum;
    }

    /**
     * 获取属性sellCDBSum<br>
     * @return 属性sellCDBSum的值
     */
    public Double getSellCDBSum() {
        return sellCDBSum;
    }

    /**
     * 设置属性sellCDBNum<br>
     * @param sellCDBNum 待设置的属性sellCDBNum的值
     */
    public void setSellCDBNum(Integer sellCDBNum) {
        this.sellCDBNum = sellCDBNum;
    }

    /**
     * 获取属性sellCDBNum<br>
     * @return 属性sellCDBNum的值
     */
    public Integer getSellCDBNum() {
        return sellCDBNum;
    }

    /**
     * 设置属性sellLineNum<br>
     * @param sellLineNum 待设置的属性sellLineNum的值
     */
    public void setSellLineNum(Integer sellLineNum) {
        this.sellLineNum = sellLineNum;
    }

    /**
     * 获取属性sellLineNum<br>
     * @return 属性sellLineNum的值
     */
    public Integer getSellLineNum() {
        return sellLineNum;
    }

    /**
     * 设置属性presentLineNum<br>
     * @param presentLineNum 待设置的属性presentLineNum的值
     */
    public void setPresentLineNum(Integer presentLineNum) {
        this.presentLineNum = presentLineNum;
    }

    /**
     * 获取属性presentLineNum<br>
     * @return 属性presentLineNum的值
     */
    public Integer getPresentLineNum() {
        return presentLineNum;
    }

    /**
     * 设置属性groupUserId<br>
     * @param groupUserId 待设置的属性groupUserId的值
     */
    public void setGroupUserId(Integer groupUserId) {
        this.groupUserId = groupUserId;
    }

    /**
     * 获取属性groupUserId<br>
     * @return 属性groupUserId的值
     */
    public Integer getGroupUserId() {
        return groupUserId;
    }

    /**
     * 设置属性higherUpGroupUserId<br>
     * @param higherUpGroupUserId 待设置的属性higherUpGroupUserId的值
     */
    public void setHigherUpGroupUserId(Integer higherUpGroupUserId) {
        this.higherUpGroupUserId = higherUpGroupUserId;
    }

    /**
     * 获取属性higherUpGroupUserId<br>
     * @return 属性higherUpGroupUserId的值
     */
    public Integer getHigherUpGroupUserId() {
        return higherUpGroupUserId;
    }

    /**
     * 设置属性residueBorrowRentSum<br>
     * @param residueBorrowRentSum 待设置的属性residueBorrowRentSum的值
     */
    public void setResidueBorrowRentSum(Double residueBorrowRentSum) {
        this.residueBorrowRentSum = residueBorrowRentSum;
    }

    /**
     * 获取属性residueBorrowRentSum<br>
     * @return 属性residueBorrowRentSum的值
     */
    public Double getResidueBorrowRentSum() {
        return residueBorrowRentSum;
    }

    /**
     * 设置属性residueSellLineMoneySum<br>
     * @param residueSellLineMoneySum 待设置的属性residueSellLineMoneySum的值
     */
    public void setResidueSellLineMoneySum(Double residueSellLineMoneySum) {
        this.residueSellLineMoneySum = residueSellLineMoneySum;
    }

    /**
     * 获取属性residueSellLineMoneySum<br>
     * @return 属性residueSellLineMoneySum的值
     */
    public Double getResidueSellLineMoneySum() {
        return residueSellLineMoneySum;
    }

    /**
     * 设置属性residueSellCDBSum<br>
     * @param residueSellCDBSum 待设置的属性residueSellCDBSum的值
     */
    public void setResidueSellCDBSum(Double residueSellCDBSum) {
        this.residueSellCDBSum = residueSellCDBSum;
    }

    /**
     * 获取属性residueSellCDBSum<br>
     * @return 属性residueSellCDBSum的值
     */
    public Double getResidueSellCDBSum() {
        return residueSellCDBSum;
    }

    /**
     * 设置属性level<br>
     * @param level 待设置的属性level的值
     */
    public void setLevel(Integer level) {
        this.level = level;
    }

    /**
     * 获取属性level<br>
     * @return 属性level的值
     */
    public Integer getLevel() {
        return level;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof GroupDeviceDayDivideCntModelBase)) {
            return false;
        }

        final GroupDeviceDayDivideCntModelBase otherModel = (GroupDeviceDayDivideCntModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
